home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1995 April / Internet Tools.iso / infoserv / www / cern / dev / www-talk.9301-9306.Z / www-talk.9301-9306 / text0127.txt < prev    next >
Encoding:
Text File  |  1995-04-24  |  524 b   |  21 lines

  1. > But ANSI C and PCC share syntax for _defining_ functions.
  2. > The preprocessor dancing is necessary for _declaring_ functions
  3. > like so:
  4. >
  5. > int foo __ARGS__((int x, int y, int z));
  6. >
  7. > but in the .c files, you can just do the usual
  8. >
  9. > int foo(x,y,z)
  10. > int x;
  11. > int y;
  12. > int z;
  13.  
  14.   True, but in the latter case you don't get any type checking of the
  15. parameters in functions that happen NOT to be declared before their
  16. definition. I agree that the syntax with extra commas is ugly, though,
  17. but there was no better way.
  18.  
  19.     JF
  20.  
  21.